package net.oschina.archx.rmi.client;

import net.oschina.archx.rmi.service.IHelloRMIService;
import org.springframework.context.ApplicationContext;
import org.springframework.context.support.ClassPathXmlApplicationContext;

/**
 * SpringRMIClient
 *
 * @author Archx[archx@foxmail.com]
 * @date 2016/2/24 0024
 */
public class SpringRMIClient {
    public static void main(String[] args) {
        ApplicationContext act = new ClassPathXmlApplicationContext("spring-context.xml");
        IHelloRMIService hello = (IHelloRMIService) act.getBean("helloService");

        if (hello != null) {
            System.out.println(hello.hello("Archx"));
        }
    }
}
